package cn.edu.hit.core.message;

import com.fasterxml.jackson.databind.ObjectMapper;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.logging.Logger;

@Deprecated
public abstract class MessageAdapterHelper implements MessageAdapter {
    protected static final Logger logger = Logger.getLogger("MessageAdapter");
    protected static final ObjectMapper mapper = new ObjectMapper();

    protected ConcurrentMap<String, Map> configureMap = new ConcurrentHashMap<>();

    @Override
    public void register(String id, Map config) {
        configureMap.put(id, config);
    }

    @Override
    public void clear() {
        configureMap.clear();
    }
}
